/**
 * 设置代理
 */
const { createProxyMiddleware } = require("http-proxy-middleware");
module.exports = function (app) {
    app.use(
        createProxyMiddleware("/test", {
            target: "https://test.com",
            changeOrigin: true,
            pathRewrite: {
                "^/test": ""
            }
        })
    );
    app.use(
        createProxyMiddleware("/api", {
            target: "https://easy-mock.com/mock/5c0f31837214cf627b8d43f0/",
            changeOrigin: true
        })
    );
};